<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Pass - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
	<h1 translate="no">Pass</h1>
		<section>
			<header>
				<div class="class-description"><p>Abstract base class for all post processing passes.</p>
<p>This module is only relevant for post processing with <a href="WebGLRenderer.html">WebGLRenderer</a>.</p></div>
			</header>
			<article>
				<h2 class="subsection-title">Import</h2>
				<p><span translate="no">Pass</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
				<pre><code class="language-js">import { Pass } from 'three/addons/postprocessing/Pass.js';</code></pre>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="Pass" translate="no">new <a href="#Pass">Pass</a><span class="signature">()</span> <span class="type-signature">(abstract) </span></h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new pass.</p>
						</div>
					</div>
				</div>
				<h2 class="subsection-title">Properties</h2>
				<div class="member">
					<h3 class="name" id="clear" translate="no">.<a href="#clear">clear</a><span class="type-signature"> : boolean</span> </h3>
					<div class="description">
						<p>If set to <code>true</code>, the pass clears its buffer before rendering</p>
						<p>Default is <code>false</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="enabled" translate="no">.<a href="#enabled">enabled</a><span class="type-signature"> : boolean</span> </h3>
					<div class="description">
						<p>If set to <code>true</code>, the pass is processed by the composer.</p>
						<p>Default is <code>true</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="isPass" translate="no">.<a href="#isPass">isPass</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
					<div class="description">
						<p>This flag can be used for type testing.</p>
						<p>Default is <code>true</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="needsSwap" translate="no">.<a href="#needsSwap">needsSwap</a><span class="type-signature"> : boolean</span> </h3>
					<div class="description">
						<p>If set to <code>true</code>, the pass indicates to swap read and write buffer after rendering.</p>
						<p>Default is <code>true</code>.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="renderToScreen" translate="no">.<a href="#renderToScreen">renderToScreen</a><span class="type-signature"> : boolean</span> </h3>
					<div class="description">
						<p>If set to <code>true</code>, the result of the pass is rendered to screen. The last pass in the composers
pass chain gets automatically rendered to screen, no matter how this property is configured.</p>
						<p>Default is <code>false</code>.</p>
					</div>
				</div>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> <span class="type-signature">(abstract) </span></h3>
					<div class="method">
						<div class="description">
							<p>Frees the GPU-related resources allocated by this instance. Call this
method whenever the pass is no longer used in your app.</p>
						</div>
					</div>
					<h3 class="name name-method" id="render" translate="no">.<a href="#render">render</a><span class="signature">( renderer : <span class="param-type"><a href="WebGLRenderer.html">WebGLRenderer</a></span>, writeBuffer : <span class="param-type"><a href="WebGLRenderTarget.html">WebGLRenderTarget</a></span>, readBuffer : <span class="param-type"><a href="WebGLRenderTarget.html">WebGLRenderTarget</a></span>, deltaTime : <span class="param-type">number</span>, maskActive : <span class="param-type">boolean</span> )</span> <span class="type-signature">(abstract) </span></h3>
					<div class="method">
						<div class="description">
							<p>This method holds the render logic of a pass. It must be implemented in all derived classes.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>renderer</strong>
									</td>
									<td class="description last">
										<p>The renderer.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>writeBuffer</strong>
									</td>
									<td class="description last">
										<p>The write buffer. This buffer is intended as the rendering
destination for the pass.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>readBuffer</strong>
									</td>
									<td class="description last">
										<p>The read buffer. The pass can access the result from the
previous pass from this buffer.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>deltaTime</strong>
									</td>
									<td class="description last">
										<p>The delta time in seconds.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>maskActive</strong>
									</td>
									<td class="description last">
										<p>Whether masking is active or not.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<h3 class="name name-method" id="setSize" translate="no">.<a href="#setSize">setSize</a><span class="signature">( width : <span class="param-type">number</span>, height : <span class="param-type">number</span> )</span> <span class="type-signature">(abstract) </span></h3>
					<div class="method">
						<div class="description">
							<p>Sets the size of the pass.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>width</strong>
									</td>
									<td class="description last">
										<p>The width to set.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>height</strong>
									</td>
									<td class="description last">
										<p>The height to set.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/postprocessing/Pass.js" translate="no" target="_blank" rel="noopener">examples/jsm/postprocessing/Pass.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>